<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE HTML>
<html>
<head>
<base href="${ctx }/">
<title>未结算订单</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet"
	href="plugin/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-datetimepicker.css" />
<link rel="stylesheet"
	href="plugin/bootstrap-table/dist/bootstrap-table.css">
<!-- <link rel="stylesheet" href="css/zoom.css" media="all" />  -->
<link rel="stylesheet" href="alert/alert.css">
<style type="text/css">
a {
	color: #73879C;
}
#que>tr>td{
    width: 20%;
}

.form-group {
    margin-left: 10px;
    margin-top: 10px;
}
#oul>li{
list-style-type: none;
margin: 10px;
}
#tctable>tbody>tr>td{
    border: 1px solid #908787;
    padding: 18px;
}
</style>
</head>
<body>

	<div>
		<ul class="breadcrumb">
			<li><i class="icon-home home-icon"></i> <a
				href="javascript:void(0)">Finance Management(财务管理)</a></li>
			<li class="active"><a href="view/finance/no_settlement_list.jsp">Unpaid Payout List(未结算订单列表)</a>
			</li>
		</ul>
	</div>
	<div class="form-inline" role="form" method="post" id="queryForm">
   <!-- <sapn>There is no bill for this week.</sapn> -->
					<div class="form-group">
						<label>Driver Name(司机名称):</label> <input type="text" id="driverName" placeholder=""
							class="form-control">
					</div>
					<div class="form-group">
						<label>Driver Account(司机账号):</label> <input type="text"
							class="form-control " id="telephone">
					</div>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<button id="queryBtn" onclick="doQuery1('demo-table',queryParams1())"
				class="btn btn-primary">Search(搜索)</button>
			<button id="queryBtn" onclick="exportTable()" class="btn btn-primary">Export(导出)
			</button>
		</div>
	<br>
	<p id="onLineNum" style='text-align: center; color: red;'></p>
	<table id="demo-table"></table>
</body>

<!-- 加载需要的js -->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="plugin/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src="js/jquery-bootstrap-pagination.js"></script>
<script src="plugin/bootstrap-table/dist/bootstrap-table.min.js"></script>
<script
	src="plugin/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js"></script>
<script src='alert/alert.js'></script>
<!--时间  -->
<script src="js/bootstrap-datetimepicker.js"></script>
<script src="js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="js/common.js"></script>
<script src="plugin/layer/layer.js"></script>
<script type="text/javascript" charset="utf-8">
    var M = {}

    $('.form_date').datetimepicker({
        minView: "month", //选择日期后，不会再跳转去选择时分秒
        language: 'zh-CN',
        format: 'dd/mm/yyyy',
        todayBtn: 1,
        autoclose: 1,
    });

    $(function () {
        initPath("${ctx }");
        initTable('demo-table', queryParams, columns, "orderItems/getNoSettlement");
        
    });
   

    var columns = [{field: '', title: 'Choose', checkbox: true},
        {
            field: 'firstName',
            title: 'Driver Name(司机名称)',
            align: 'center',
            valign: 'middle'
            },
        {
            field: 'telephone',
            title: 'Driver Phone(司机电话)',
            align: 'center',
            valign: 'middle'
        },
        {
            field: 'totalBusiness',
            title: 'Total Revenue(营业总额)',
            align: 'center',
            valign: 'middle',
        },
        {
            field: 'platform',
            title: 'fab Commissions(平台收取)',
            align: 'center',
            valign: 'middle'
        },
        {
            field: 'totalRevenue',
            title: 'Total(总收入)',
            align: 'center',
            valign: 'middle'
        },
        {
            field: 'tolls',
            title: 'Toll(过路费)',
            align: 'center',
            valign: 'middle'
        },
        {
            field: 'upto',
            title: 'Cleaning Fees(清洁费)',
            align: 'center',
            valign: 'middle'
        },
        {
            field: 'tip',
            title: 'Tips(小费)',
            align: 'center',
            valign: 'middle'
        },
        {
            field: 'id',
            title: 'Operation(操作)',
            align: 'center',
            valign: 'middle',
            formatter: function (value, row, index) {
            	var str ='<a class="btn btn-info" style="margin-left:5px" href="view/finance/no_settlement_details.jsp?id='+value+'">View order details</a>';
                return str;
            }
        }
    ];

    function queryParams(params) {
        var param = {
       		driverName:$('#driverName').val(),
       		driverPhone:$('#driverPhone').val(),
            pageNo: this.pageNumber,
            pageSize: this.pageSize
        }
        return param;
    }

    function queryParams1() {
        var param = {
        	driverName:$('#driverName').val(),
        	driverPhone:$('#driverPhone').val(),
            pageNo: 1,
            pageSize: this.pageSize
        }
        return param;
    }

  
</script>
</html>


